﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProyectoEscuela
{
    public partial class MDIPrincipal : Form
    {
        private int childFormNumber = 0;

        public MDIPrincipal()
        {
            InitializeComponent();
        }

        private void ShowNewForm(object sender, EventArgs e)
        {
            Form childForm = new Form();
            childForm.MdiParent = this;
            childForm.Text = "Window " + childFormNumber++;
            childForm.Show();
        }

        private void OpenFile(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
            if (openFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                string FileName = openFileDialog.FileName;
            }
        }

        private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void CutToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }

        private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }

        private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }

        

        private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.Cascade);
        }

        private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileVertical);
        }

        private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileHorizontal);
        }

        private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.ArrangeIcons);
        }

        private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form childForm in MdiChildren)
            {
                childForm.Close();
            }
        }

        private void SISGEP_Load(object sender, EventArgs e)
        {
            // Se deshabilita la pantalla de inicio de busqueda de persona
            //frmBuscarPersona frmBusPers = new frmBuscarPersona();
            //frmBusPers.MdiParent = this;
            //frmBusPers.Show();

        }

        private void undoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //frmCalificacion frmCalif = new frmCalificacion();
            //frmCalif.MdiParent = this;
            //frmCalif.Show();
        }

        private void helpMenu_Click(object sender, EventArgs e)
        {
           
        }



        private void redoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //frmAltaAlumno frmAltaAlumno = new frmAltaAlumno();
            //frmAltaAlumno.MdiParent = this;
            //frmAltaAlumno.Show();
        }

        private void seguimientoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSeguimientoCualitativo formSC = new frmSeguimientoCualitativo();
            formSC.MdiParent = this;
            formSC.Show();
        }

        private void asistenciasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAsistenciaALumno formAsis = new frmAsistenciaALumno();
            formAsis.MdiParent = this;
            formAsis.Show();
        }



        private void califiacionesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCalificaciones formCal = new frmCalificaciones();
            formCal.MdiParent = this;
            formCal.Show();
        }

        private void fichaMedicaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmActaAccidente frmAA = new frmActaAccidente();
            frmAA.MdiParent = this;
            frmAA.Show();
        }

      
        private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmLicXSaludAutorizadoXdir frm = new frmLicXSaludAutorizadoXdir();
            frm.MdiParent = this;
            frm.Show();

        }

        private void modificaciónDatosIdentificaciónToolStripMenuItem_Click(object sender, EventArgs e)
        {

            frmModificacionDatosIDAgente frm = new frmModificacionDatosIDAgente();
            frm.MdiParent = this;
            frm.Show();
        }

        private void bajaOCambioDeSituaciónToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmBajaOCambioDeSituacionDeAgente frm = new frmBajaOCambioDeSituacionDeAgente();
            frm.MdiParent = this;
            frm.Show();
        }

        private void altaCargosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAltaAgente frm = new frmAltaAgente();
            frm.MdiParent = this;
            frm.Show();
        }

        private void mnuAgenteAdm_Click(object sender, EventArgs e)
        {
            frmABMAgenteSH formABMAgenteSH = new frmABMAgenteSH();
            formABMAgenteSH.MdiParent = this;
            formABMAgenteSH.Show();
        }

        private void mnuEscuela_Click(object sender, EventArgs e)
        {
            //frmABMEntidades frmEntidades = new frmABMEntidades();
            //frmEntidades.MdiParent = this;
            //frmEntidades.tbcEntidades.SelectedIndex = 0;
            //frmEntidades.Show();
        }

        private void mnuProvincias_Click(object sender, EventArgs e)
        {
            //frmABMEntidades frmEntidades = new frmABMEntidades();
            //frmEntidades.MdiParent = this;
            //frmEntidades.tbcEntidades.SelectedIndex = 1;
            //frmEntidades.Show();
        }

        private void mnuLocalidades_Click(object sender, EventArgs e)
        {
            //frmABMEntidades frmEntidades = new frmABMEntidades();
            //frmEntidades.MdiParent = this;
            //frmEntidades.tbcEntidades.SelectedIndex = 2;
            //frmEntidades.Show();
        }

        private void manualDeUsuarioToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Help.ShowHelp(this, "c:\\SisGEP.chm");
        }

        private void mnuAlumnosAdm_Click(object sender, EventArgs e)
        {
            frmABMAlumno frmABMAlumno = frmABMAlumno.GetInstance();
            frmABMAlumno.MdiParent = this;
            frmABMAlumno.Show();
        }

        private void informeMensualDeLicenciasPorEnfermedadIL01ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmIL01 frm = new frmIL01();
            frm.MdiParent = this;
            frm.Show();


        }

        private void informeMensualDeLicenciasIL02ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmIL02 frm = new frmIL02();
            frm.MdiParent = this;
            frm.Show();
            
        }

        private void asignaciónDeLicenciasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAsignaciónDeLicencias frm = new frmAsignaciónDeLicencias();
            frm.MdiParent = this;
            frm.Show();

        }


        private void btnModifDatosAgente_Click(object sender, EventArgs e)
        {
            frmModificacionDatosAgente frm = new frmModificacionDatosAgente();
            frm.MdiParent = this;
            frm.Show();
        }

        private void acercaDeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAcercaDe frm = new frmAcercaDe();
            frm.ShowDialog();
        }

        private void salirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Esto finalizará la sesión actual. ¿Desea continuar?", "Salir", MessageBoxButtons.YesNo,MessageBoxIcon.Exclamation) == DialogResult.Yes)
            {
                this.Dispose();
                this.Close();
            }

        }

 


    }
}
